package com.ruoyi.system.domain;

import com.ruoyi.system.entity.AbdulBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 库存调拨详情对象 inv_inventory_transfer_detail
 *
 * @author ruoyi
 * @date 2023-07-18
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("inv_inventory_transfer_detail")
@ApiModel("库存(调拨/报损)详情实体")
public class InvInventoryTransferDetail extends AbdulBaseEntity {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    /**
     * 库存(调拨/报损)-主表Id（关联父表inv_inventory_transfer/inv_reporting_losses)
     */
    @ApiModelProperty("库存调拨-主表Id")
    private Long transferId;


    @ApiModelProperty("详情类型 （1-库存调拨 2-库存报损）")
    private Integer detailType;

    /**
     * 类别
     */
    @ApiModelProperty("类别")
    private String category;

    /**
     * 分类
     */
    @ApiModelProperty("分类")
    private String classification;

    /**
     * 商品名称
     */
    @ApiModelProperty("商品名称")
    private String productName;

    /**
     * 条码
     */
    @ApiModelProperty("条码")
    private String barcode;

    /**
     * 单位
     */
    @ApiModelProperty("单位")
    private String unit;

    /**
     * 规格
     */
    @ApiModelProperty("规格")
    private String specifications;

    /**
     * 库存单价
     */
    @ApiModelProperty("库存单价")
    private BigDecimal stockPrice;

    /**
     * 库存数量
     */
    @ApiModelProperty("库存数量")
    private Integer stockQuantity;

    /**
     * 调拨数量
     */
    @ApiModelProperty("(调拨/报损)数量")
    private Integer transferQuantity;

    /**
     * 计算出的总值（元）
     */
    @ApiModelProperty("计算出的总值（元）")
    @TableField(value = "total_value",insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private BigDecimal totalValue;


    @ApiModelProperty("商品id")
    private Long productManagementId;
}
